<?php
/**
 * Created by PhpStorm.
 * User: addd
 * Date: 2020/10/22
 * Time: 16:36
 */
namespace App\Admin\Selectable;

use Encore\Admin\Facades\Admin;
use Encore\Admin\Grid\Filter;
use Encore\Admin\Grid\Selectable;

class Setmeals extends Selectable
{
    public $model = \App\Models\SetMeal::class;

    public function make()
    {
        // TODO: Implement make() method.
        $this->model()->where('store_id', Admin::user()->store_id);
        $this->column('id');
        $this->column('name','套餐名称');

        $this->filter(function (Filter $filter) {
            // 去掉默认的id过滤器
            $filter->disableIdFilter();
            $filter->like('name','套餐名称');
        });
    }
}